#include <sys/time.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <unistd.h>
#include <limits.h>
#include "../DES/des.c"

// struct timeval{ 
//     long tv_sec; //秒 
//     long tv_usec; //微秒 
// }; 
int main(int argc, char const *argv[])
{
    struct timeval tv;
    char time[16];
    
    gettimeofday(&tv, NULL);
    sprintf(time, "%ld", tv.tv_sec);
    
    char key[8] = "223344";
    char *c1 = EncryptionBS(time, key);
    char *c2 = DecryptionBS(c1, key);
    printf("%s\n", time);
    printf("e %s\n", c1);
    printf("d %s\n", c2);
    
    return 0;
}
